<?php


        //OXID INTEGRATION        
        error_reporting(E_ALL|E_STRICT);
        ini_set("display_errors", 1);
        
        // Setting error reporting mode
        error_reporting( E_ALL ^ E_NOTICE );
                
        //setting basic configuration parameters
        ini_set('session.name', 'sid' );
        ini_set('session.use_cookies', 0 );
        ini_set('session.use_trans_sid', 0);
        ini_set('url_rewriter.tags', '');
        ini_set('magic_quotes_runtime', 0);
        
        //repair session
        if (!isset($_COOKIE[session_name()])) $_COOKIE[session_name()] = session_id();
        
        /**
        * Returns shop base path.
        *
        * @return string
        */
        function getShopBasePath()
        {
            return dirname(__FILE__).'/';
        }
                
        // custom functions file
        include getShopBasePath() . 'modules/functions.php';
        
        // Generic utility method file
        require_once getShopBasePath() . 'core/oxfunctions.php';
        
        // Including main ADODB include
        require_once getShopBasePath() . 'core/adodblite/adodb.inc.php';
        
         // Including needed oxid classes
        require_once getShopBasePath() . 'core/oxbasket.php';
        require_once getShopBasePath() . 'core/oxsession.php';
                        
        // set the exception handler already here to catch everything, also uncaught exceptions from the config or utils
        
        // initializes singleton config class
        $myConfig = oxConfig::getInstance();
        
        // reset it so it is done with oxnew
        $iDebug = $myConfig->getConfigParam('iDebug');
        set_exception_handler(array(oxNew('oxexceptionhandler', $iDebug), 'handleUncaughtException'));
        
        //strips magics quote if any
        oxUtils::getInstance()->stripGpcMagicQuotes();
      
?>